Skip to content

fix(txe): align aztec_avm_returndataSize registry type with Noir u32#24480

Merged
nventuro merged 1 commit into
merge-train/fairies-v5from
nv/oracle-serialization-hardeding
Jul 2, 2026
Merged

fix(txe): align aztec_avm_returndataSize registry type with Noir u32#24480
nventuro merged 1 commit into
merge-train/fairies-v5from
nv/oracle-serialization-hardeding

Conversation

@nventuro

@nventuro nventuro commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

It was set to Field but was u32. I also adjusted some slightly outdated comments.

The registry declared FIELD for aztec_avm_returndataSize while the Noir
oracle returns u32. Change the entry to U32 and the handler signature to
return a number, matching every other AVM size/gas field. The wire format
is unchanged (both serialize to a single field element), so only the TXE
oracle interface hash is updated, with no version bump.

Also replace stale docstring references to the removed
#[auto_serialization_test] macro with #[generate_oracle_tests].
@nventuro
nventuro requested a review from nchamo July 2, 2026 20:43
@nventuro
nventuro enabled auto-merge (squash) July 2, 2026 20:43

@nchamo nchamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch on the outdated docs. Thanks!

@nventuro
nventuro merged commit 4057d0b into merge-train/fairies-v5 Jul 2, 2026
12 checks passed
@nventuro
nventuro deleted the nv/oracle-serialization-hardeding branch July 2, 2026 21:04
vezenovm pushed a commit that referenced this pull request Jul 2, 2026
…4482)

## Problem

CI on `merge-train/fairies-v5` is red at the `yarn-project` build step
([ci.aztec-labs.com/1783026321562696](http://ci.aztec-labs.com/1783026321562696)).
The `compile_all` → `yarn tsgo -b --emitDeclarationOnly` typecheck fails
with:

```
wallet-sdk/src/base-wallet/base_wallet.ts(375,36): error TS2339: Property 'address' does not exist on type 'ContractInstancePreimage'.
wallet-sdk/src/base-wallet/base_wallet.ts(377,113): error TS2339: Property 'address' does not exist on type 'ContractInstancePreimage'.
```

These two were the complete set of errors reported by the
(non-fail-fast) tsgo pass.

## Root cause

This is a train-integration break, not a defect in the commit the CI run
is attributed to (#24480, which only touched a TXE registry type). On
the `v5-next` base, `ContractInstancePreimage` was refactored to no
longer store a derived `address` field (address is now computed from the
preimage; the with-address variant is the separate
`ContractInstancePreimageWithAddress`). The fairies train's rewrite of
`BaseWallet.registerContract` still read `instance.address`, which no
longer exists on that type.

## Fix

`PXE.registerContract(instance)` already returns the derived
`AztecAddress` (it computes
`computeContractAddressFromInstance(instance)` internally). Capture and
use that returned address for the account-mismatch assertion instead of
the removed `instance.address` field. This is semantically identical —
the returned value is exactly the address the field used to hold — and
touches only the two failing references.

## Verification

The workspace this fix was prepared in is a bare checkout with no
build/test cache available (no redis/docker) and insufficient free disk
for a from-scratch `bb` + `noir` + TS build, so a full local
`./bootstrap.sh ci-fast` could not be run to completion. The change is
verified by inspection against the type definitions and the
`PXE.registerContract` return contract; CI on this PR will exercise the
real build.


---
*Created by
[claudebox](https://claudebox.work/v2/sessions/8542372f24dbb848) ·
group: `slackbot`*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants